# @oss-disable[end= ]: load("@fbsource//tools/build_defs:default_platform_defs.bzl", "get_host_target_platform")
load("@prelude//toolchains/android/tools/build_rules:fb_native.bzl", "fb_native")
load("@prelude//utils:source_listing.bzl", "source_listing")

oncall("android_devxx")

source_listing()

fb_native.command_alias(
    name = "protoc",
    # @oss-disable[end= ]: default_target_platform = get_host_target_platform(use_minimal_xcode = False),
    platform_exe = {
        "linux": "prelude//toolchains/android/third-party:protoc-linux-x86_64",
        "macos": "prelude//toolchains/android/third-party:protoc-osx-x86_64",
        "windows": "prelude//toolchains/android/third-party:protoc-windows-x86_64",
    },
    visibility = ["PUBLIC"],
)

fb_native.command_alias(
    name = "gen-grpc",
    # @oss-disable[end= ]: default_target_platform = get_host_target_platform(use_minimal_xcode = False),
    platform_exe = {
        "linux": "prelude//toolchains/android/third-party:protoc-gen-grpc-java-linux-x86_64",
        "macos": "prelude//toolchains/android/third-party:protoc-gen-grpc-java-osx-x86_64",
    },
    visibility = ["PUBLIC"],
)

fb_native.alias(
    name = "gen-grpc-windows",
    actual = "prelude//toolchains/android/third-party:protoc-gen-grpc-java-windows-x86_64",
    visibility = ["PUBLIC"],
)
